import type { RouteRecordRaw } from 'vue-router'
import UserLoginPage from '@/pages/user/UserLoginPage.vue'

export const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: '主页',
    component: () => import('../views/HomeView.vue'),
  },
  {
    path: '/user',
    name: '用户',
    children: [
      {
        path: '/user/login',
        name: '用户登录',
        component: UserLoginPage,
      },
      {
        path: '/user/register',
        name: '用户注册',
        component: () => import('../pages/user/UserRegisterPage.vue'),
      },
    ],
    meta: {
      hide: true,
    },
  },
  {
    path: '/admin/userManage',
    name: '用户管理',
    component: () => import('../pages/admin/UserManagePage.vue'),
    meta: {
      hide: false,
    },
  },
  {
    path: '/others',
    name: '编程导航',
    component: () => import('../views/AboutView.vue'), // 假设有一个 OthersView.vue 组件
    meta: {
      externalLink: 'https://www.codefather.cn',
    },
  },
]
